<?php


namespace App\Models;


use Illuminate\Database\Eloquent\SoftDeletes;

class ImUserBalance extends BaseModel
{
    use SoftDeletes;
    protected $table = 'im_user_balance';

    //用户关系
    public function user()
    {
        return $this->belongsTo(ImUsers::class, 'user_id', 'id');
    }

    /**
     * 获取操作类型
     * @param $status integer
     * @return string
     */
    public static function getStatus($status)
    {
        $str = '';
        switch ($status) {
            case 0:
                $str = '冻结';
                break;
            case 1:
                $str = '解冻';
                break;
        }
        return $str;
    }
}
